From 2657955cb4dc4cbe703d77bb43a6394a8ee98f74 Mon Sep 17 00:00:00 2001
From: trisusilo48 <tri.susilo@altama.co.id>
Date: Thu, 24 Oct 2024 16:27:54 +0700
Subject: add seo

---
 src/pages/shop/find/[slug].jsx | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

(limited to 'src/pages/shop/find/[slug].jsx')

diff --git a/src/pages/shop/find/[slug].jsx b/src/pages/shop/find/[slug].jsx
index 4666add5..50797153 100644
--- a/src/pages/shop/find/[slug].jsx
+++ b/src/pages/shop/find/[slug].jsx
@@ -3,6 +3,8 @@ import { useRouter } from 'next/router';
 import { useEffect, useState } from 'react';
 import Seo from '@/core/components/Seo';
 import dynamic from 'next/dynamic';
+import { get } from 'lodash-contrib';
+import { getIdFromSlug, getNameFromSlug } from '@/core/utils/slug';
 
 const BasicLayout = dynamic(() =>
   import('@/core/components/layouts/BasicLayout')
@@ -18,6 +20,7 @@ export default function FindPage() {
   const [result, setResult] = useState(null);
   const [query, setQuery] = useState(null);
 
+  const slug = getNameFromSlug( route.query.slug) +' '+ getIdFromSlug( route.query.slug)
   const getUrls = async (url) => {
     try {
       let response = await axios(
@@ -38,13 +41,24 @@ export default function FindPage() {
     if (result) {
       let fq = `category_parent_ids:${result.category_id_i} AND manufacture_id_i:${result.brand_id_i}`;
       setQuery({
-        fq : fq
+        fq: fq,
       });
     }
   }, [result]);
 
   return (
     <BasicLayout>
+      <Seo
+        title={`Jual ${slug} di Indoteknik`}
+        description={`Jual ${slug} Kirim Jakarta Surabaya Semarang Makassar Manado Denpasar Balikpapan Medan Palembang Lampung Bali Bandung Makassar Manado.`}
+        additionalMetaTags={[
+          {
+            property: 'keywords',
+            content: `Jual ${slug}, harga ${slug}, ${slug} murah, toko ${slug}, ${slug} jakarta, ${slug} surabaya`,
+
+          },
+        ]}
+      />
       {query && <ProductSearch query={query} prefixUrl={`${route.asPath}`} />}
     </BasicLayout>
   );
-- 
cgit v1.2.3

